/**
 * 
 */
package com.hydra.designpattern.decorator;

/**
 * @Created on 2013-4-10
 * @Title:抽象装饰类，给component添加额外的职责
 * @Description:
 * @author:黄海军
 */
public abstract class Decorator extends Component {
	Component component;

	/**
	 * @Discription:设置component
	 * @param component
	 *            The component to set.
	 */
	public void setComponent(Component component) {
		this.component = component;
	}

	/**
	 * @Created on 2013-4-10
	 * @Discription:重写operation，实际执行Component的operation
	 * @author:黄海军
	 * @update:黄海军
	 */
	@Override
	public void operation() {
		component.operation();
	}

}
